import React, { Component } from 'react'
import "./Songs.css"

export default class Songs extends Component {

  render() {
    let { data, fn } = this.props
    return (


      <ul className='ppp'>
        {data.map((iteam, index) => {
          return <li key={index} onClick={fn(index)}>
            <img src={iteam.cover} alt="" />
            <p>{iteam.name}</p>
            {
              iteam.subed ? <p>{iteam.artistName}</p> : null
            }
          </li>
        })
        }
      </ul>
    )
  }
}
